package per.dj.testpro.entity.protocol;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import lombok.Data;

@Data
public class Res_08 implements IMessageBody{

    //开始充电结果
    private Byte startRes;

    private Byte serialNumber;

    public final byte[] WriteToBytes() {

        ByteBuf buff = Unpooled.buffer(2);

        try{
            buff.writeByte(getStartRes());
            buff.writeByte(getSerialNumber());
            return buff.array();
        }finally {
            if(buff != null){
                buff.release();
            }
        }
    }

    public final void ReadFromBytes(byte[] bytes) {

    }
}
